<!--[name]图库浏览模板[/name]-->
<extend name="base/common" />
<block name="style">
    <style>.galleria-info { width: 100%; background: rgba(0, 0, 0, 0.7); } .galleria-info-description { font: normal 12px/1.4 georgia,serif; color: #fff; } .galleria-current { bottom: 25%; right: 50%; color: #cc191b; font-size: 36px; } .galleria-total { font-size:14px; } .galleria-theme-classic .galleria-counter{ font-size: 32px; }</style>
</block>
<block name="body">
    <article class="article article-condensed">
        <header>
            <h1 class="text-center">{$article.title}</h1>
            <dl class="dl-inline">
                <if condition="$article[from]">
                <dt>来源：</dt>
                <dd>
                    <if condition="$article[fromurl]">
                    <a href="{$article[fromurl]}" target="_blank">
                    </if>
                    {$article.from}
                    <if condition="$article[fromurl]"></a></if>
                </dd>
                <else>
                <if condition="$article[author]">
                <dt>作者：</dt>
                <dd>{$article.author}</dd>
                </if>
                </if>
                <dt>最后修订：</dt>
                <dd>{$article.dateline|friendly_date}</dd>
                <dt></dt>
                <dd class="pull-right">
                    <if condition="$article[tags]">
                    <volist name="article[tags]" id="v">
                        <a href="{:url('Misc/tag', array('tag'=>$v['tagname']))}" class="label label-info">{$v[tagname]}</a>
                    </volist>
                    </if>
                    <a href="{:url('Article/lists', array('catid'=>$cat[catid]))}" class="label label-success">{$cat.catname}</a> <span class="label label-danger"><i class="icon-eye-open"></i> {$article.viewnum|intval}</span>
                </dd>
            </dl>
            <section class="abstract">
            <p><strong>摘要：</strong>{$article.summary}</p>
        </section>
    </header>
    <section class="content">
        <if condition="$aimgs">
            <div id="galleria">
                <volist name="aimgs" key="key" id="var">
                    <a href="{$var.url}">
                        <img src="{$var.thumb_url}" title="{$var.title}" alt="{$key}">
                    </a>
                </volist>
            </div>
            <div id="tips" style="top: 0px; color: #fff; width: 100%; text-align: center; display: none; position: absolute; z-index: 999999; font-size: 16px; font-weight: bold;">双击可以切换为全屏显示！</div>
        </if>
        {$article.content}
    </section>
    <footer>
        <if condition="$prev || $next">
        <ul class="pager pager-justify">
            <if condition="$prev">
            <li class="previous"><a href="{:url('Article/view',array('aid'=>$prev['aid']))}"><i class="icon-arrow-left"></i> {$prev.title}</a></li>
            </if>
            <if condition="$next">
            <li class="next"><a href="{:url('Article/view',array('aid'=>$next['aid']))}">{$next.title} <i class="icon-arrow-right"></i></a></li>
            </if>
        </ul>
        </if>
        {:hook('documentDetailAfter', $article)}
    </footer>
</article>
</block>
<block name="script">
    <if condition="$aimgs">
        <script type="text/javascript" src="__STATIC__/jquery/galleria/galleria-1.4.2.min.js?{$Think.const.VERHASH}"></script>
        <script>
            Galleria.TOUCH = 1;
            Galleria.DEBUG = 0;
            // Load fullscreen theme
            Galleria.loadTheme('__STATIC__/jquery/galleria/themes/classic/galleria.classic.min.js');
            Galleria.ready(function(options) {
                g = this;
                $('.galleria-images').dblclick(function() {
                    if (g._fullscreen.active) {
                        g.exitFullscreen();
                    } else {
                        g.enterFullscreen();
                    }
                });
            });

            $("#galleria").css('width', 'auto').css('height', 600);
            // Intialize Galleria
            $('#galleria').galleria({
                imageCrop: false,
                autoplay: 7000,
                fullscreenCrop: false
            });
        </script>
    </if>
</block>